package com.example.seckilldemo.config;

import com.example.seckilldemo.pojo.User;

/**
 * @author bc
 */


public class UserContext {
    private static ThreadLocal<User> userHolder = new ThreadLocal<User>();

    public static void setUser(User user){
        userHolder.set(user);
    }
    public static User getUser(){
        return userHolder.get();
    }
}
